<% keys = @unit_error_warn.keys()
   keys.sort
%>
<% if keys.size == 1 && @unit_error_warn[keys[0]][0] && @unit_error_warn[keys[0]][0].size == 0 && @unit_error_warn[keys[0]][1].size==0%>
    <span id='pass' style="font-size:10pt">恭喜，您的数据通过审核！</span>
    <script>
        setTimeout('new Effect.Puff(\'pass\')',4250)
    </script>
<% else%>

  <% p @unit_error_warn
  for key in keys 
    value = @unit_error_warn[key]
  %>

    <% errors = value[0]
        warns = value[1] 
    %>
    <% if !errors%>
    <table width=100% cellspacing=0 cellpadding=0 border=0>
	   <tr  class=clsTrHeader><td>该单位未填数..</td></tr>
	</table>
    <% next %>
    <% end %>
    
    <a id="resultTable-switch" style="font-size:12" href="javascript:toggle('resultTable', '显示', '隐藏')">隐藏</a>
    <table id='resultTable' width=100% cellspacing=0 cellpadding=0 border=0 style="table-layout:fixed;word-wrap: break-word; ">
	   <tr  class=clsTrHeader>
		  <th width="10%">类型</td>
		  <th width="25%">公式</td>
		  <th width="20%">表名及单元格</td>
		  <th width="45%">内容</td>
	   </tr>
	   <% index = 0%>
     <% if @msgtype == "alltype" || @msgtype == "error"%>	  
	    <% for error in errors%>
	       <%= ColorRow(index)%>
	        <td>错误</td>
	        <td><%=error[2]%></td>  
	        <td>
		      <% str = error[1].join(",")%>
		      <a href='javascript:placeErrorFlag("<%= str %>");'><%= str %></a>
		     </td>
		    
		    <td><%=error[0]%></td>
	    </tr>
	    <% index += 1%>
	    <% end %>
	   <%end%>
	   
	  <% if @msgtype == "alltype" || @msgtype == "warning"%>	   
	    <% for error in warns%>
	       <%=ColorRow(index)%>
	        <td>警告</td>
	        <td><%=error[2]%></td>  
		    <td>
		      <% str = ""%>
		      <% for cell in error[1]%>
		          <%str += cell + ','%>
		      <% end %>
		      <a href='javascript:placeWarnFlag("<%= str %>");'><%= str %></a>
		      
		       </td>
		     <td><%=error[0]%></td>
	     </tr>
	    <% index += 1%>
	    <% end %>
	  <%end%>
    </table>
  <% end %>
<% end %>

